FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER ly ly@family.com

# timezone
ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# port
EXPOSE 8080

# add file
ARG JAR_FILE
ADD target/${JAR_FILE} ./app.jar

# java_opts
ENV JAVA_OPTS=""

ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar ${0} ${@}"]